home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 99
/
(Vol 99) Jan 19 2010.iso
/
Games
/
aeroplane.swf
/
scripts
/
frame_13
/
DoAction.as
Wrap
Text File
|
2010-01-19
|
2KB
|
102 lines
function EncrpytString(strVal)
{
var strKey = "aHfEjcDebChGiAfIjDbEjacD";
var nLenKey = strKey.length;
var strZero = "0";
var _loc3_ = "";
var nTot = strVal.length;
var _loc1_ = 0;
_loc3_ = "";
var nCodeVal;
var nCodeKey;
var _loc2_ = undefined;
var nChecksum = 0;
nCnt = 0;
while(nCnt < nTot)
{
nCodeVal = strVal.charCodeAt(nCnt);
if(nCodeVal >= 128)
{
nCodeVal = "X";
}
nCodeKey = strKey.charCodeAt(_loc1_);
_loc1_ += 1;
if(_loc1_ >= nLenKey)
{
_loc1_ = 0;
}
_loc2_ = nCodeVal % 16 + nCodeKey;
_loc3_ += String.fromCharCode(_loc2_);
nChecksum += _loc2_;
nCodeKey = strKey.charCodeAt(_loc1_);
_loc1_ += 1;
if(_loc1_ >= nLenKey)
{
_loc1_ = 0;
}
_loc2_ = Math.floor(nCodeVal / 16) + nCodeKey;
_loc3_ += String.fromCharCode(_loc2_);
nChecksum += _loc2_;
nCnt++;
}
nChecksum %= 256;
nCodeKey = strKey.charCodeAt(_loc1_);
_loc1_ += 1;
if(_loc1_ >= nLenKey)
{
_loc1_ = 0;
}
_loc2_ = nChecksum % 16 + nCodeKey;
_loc3_ += String.fromCharCode(_loc2_);
nCodeKey = strKey.charCodeAt(_loc1_);
_loc1_ += 1;
if(_loc1_ >= nLenKey)
{
_loc1_ = 0;
}
_loc2_ = Math.floor(nChecksum / 16) + nCodeKey;
_loc3_ += String.fromCharCode(_loc2_);
return _loc3_;
}
function GetUrlParam(strUrl, strParam)
{
var _loc3_ = strUrl.toLowerCase();
var _loc1_ = _loc3_.indexOf(strParam);
var nParamLen = strParam.length;
if(_loc1_ > 0)
{
var nNumChars;
var _loc2_ = _loc3_.indexOf("&",_loc1_ + nParamLen);
if(_loc2_ > 0)
{
nNumChars = _loc2_ - _loc1_;
}
else
{
nNumChars = strUrl.length - _loc1_;
}
return strUrl.substr(_loc1_ + nParamLen,nNumChars);
}
return "";
}
function GetBaseUrl(strUrl)
{
var _loc1_ = strUrl.toLowerCase();
var nNumChars = _loc1_.length;
var _loc2_ = _loc1_.indexOf("?",0);
if(_loc2_ > 0)
{
nNumChars = _loc2_;
}
var _loc3_ = "download";
if(_loc1_.substr(0,4) == "http")
{
_loc3_ = strUrl.substr(7,nNumChars - 7);
}
return _loc3_;
}
stop();
stopAllSounds();
_root._x = 0;
_root._y = 0;